using System;
using System.Collections.Generic;
using System.Text;
using DTO;
using DAO;
using System.Data;

namespace BUS
{
	/// <summary> 
	///Author: nnamthach@gmail.com 
	/// <summary>
    public class aFilterControl
    {
		#region Local Variable
        private aFilterDataAccess _aFilterDAO;
		#endregion Local Variable
		
		#region Method
        public aFilterControl()
        {
            _aFilterDAO = new aFilterDataAccess();
        }
		
        public aFilterInfo Get_aFilter(
			Int32 TID
		, ref string sErr)
        {
            return _aFilterDAO.Get_aFilter(
			TID
			, ref sErr);
        }
		
        public DataTable GetAll_aFilter(ref string sErr)
        {
            return _aFilterDAO.GetAll_aFilter(ref sErr);
        }

        public DataTable Get_aFilterUser(string User, string TableName, string DB, ref string sErr)
        {
            return _aFilterDAO.Get_aFilterUser(User, TableName, DB, ref sErr);
        }
		
        public Int32 Add_aFilter(aFilterInfo obj, ref string sErr)
        {
            return _aFilterDAO.Add_aFilter(obj, ref sErr);
        }
		
        public string Update_aFilter(aFilterInfo obj)
        {
            return _aFilterDAO.Update_aFilter(obj);
        }
		
        public string Delete_aFilter(
			Int32 TID
		)
        {
            return _aFilterDAO.Delete_aFilter(
			TID
			);
        }

        public string Delete_aFilterAll(
            String aUser, String aTable, String DB
        )
        {
            return _aFilterDAO.Delete_aFilterAll(
            aUser, aTable, DB
            );
        }  
        public Boolean IsExist_aFilter(
			Int32 TID
		)
        {
            return _aFilterDAO.IsExist_aFilter(
			TID
			);
        } 
		
      /*  public string Delete_aFilter(String arrID)
        {
            string kq = "";
            string[] arrStrID = arrID.Split(',');
            foreach (string strID in arrStrID)
            {
                if (strID != "")
                {
                    int ID = Convert.ToInt32(strID);
                    kq += _aFilterDAO.Delete_aFilter(ID);
                }
            }
            return kq;
        } */
		
		
        
        public DataTable Search(String columnName, String columnValue, String condition, ref String sErr)
        {           
            return _aFilterDAO.Search(columnName, columnValue, condition, ref  sErr);
        }

        public DataTable executeSelectQuery(string sqlString, ref String sErr)
        {
            return _aFilterDAO.executeSelectQuery(sqlString, ref sErr);
        }
        
		#endregion Method

    }
}
